fix(files_sharing): apply link share password on first save#60311
Merged
Conversation
c02d642 to
34d356b
Compare
come-nc
approved these changes
May 12, 2026
Contributor
|
/backport to stable33 |
dc81abf to
674fa0d
Compare
Pre-declare newPassword on the share state so Vue 2's reactivity covers it from the start. Without this, $set later relies on a property-addition notification path that races with the toggle's async setter and intermittently drops the password in certain build environments. Fixes: #57011 -e Signed-off-by: Peter Ringelmann <peter.ringelmann@nextcloud.com>
-e Signed-off-by: Peter Ringelmann <peter.ringelmann@nextcloud.com>
674fa0d to
2dfa3b8
Compare
CarlSchwan
approved these changes
May 12, 2026
|
The backport to # Switch to the target branch and update it
git checkout stable33
git pull origin stable33
# Create the new backport branch
git checkout -b backport/60311/stable33
# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts, resolve them
git cherry-pick f96cf793 2dfa3b81
# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/60311/stable33Error: Failed to check for changes with origin/stable33: No changes found in backport branch Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports. |
1 task
Contributor
Author
|
/backport to stable32 |
|
The backport to # Switch to the target branch and update it
git checkout stable32
git pull origin stable32
# Create the new backport branch
git checkout -b backport/60311/stable32
# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts, resolve them
git cherry-pick f96cf793 2dfa3b81
# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/60311/stable32Error: Failed to check for changes with origin/stable32: No changes found in backport branch Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports. |
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Setting a password on a public link share doesn't always apply on the first save. The input shows a value but the create-share request drops the password; you have to toggle "Set password" off and on, or save twice, for it to stick.
The
isPasswordProtectedsetter awaitsGeneratePasswordthen calls$set(share, 'newPassword', ...). BecausenewPasswordisn't on the share at observation time, this goes through Vue 2's property-addition path, which only notifies renders subscribed to the parent's__ob__.dep. Whether the field's render is in that subscriber set depends on prop-access ordering at first read. Customer/enterprise builds land on the broken side; some dev setups don't, which is why this has been hard to reproduce.Pre-declaring
newPasswordon_share(with a class getter/setter) gets Vue's observer to wire it up alongside the rest of the share state.$setthen writes through an existing reactive property and notifications go through its own dep.Checklist
3. to review, feature component)stable32)